const mongoose = require("mongoose")
const { Schema, model } = mongoose
const MusicListSchema = new Schema({
    name: {
        type: String,
        required: [true, "name 是必须的"],
    },
    m_id: {
        type: String,
        required: [true, "m_id 是必须的"]
    },
    pic_url: {
        type: String,
        required: [true, "pic 是必须的"]
    },
    isAdmin: {
        type: Boolean,
        required: true
    },
    musics: [{ type: mongoose.SchemaTypes.ObjectId, ref: 'Music' }],
})

const MusicList = model("MusicList", MusicListSchema)
module.exports = MusicList